import {
    doExec
} from '@/api/request'

const apiPrefix = window.apiPrefix;

//本地
export const api = {
    // 系统管理员
    manage: {
        // 登录
        login(opts) {
            return doExec(`${apiPrefix}admin/loginApp`, opts);
        },
        out(opts) {
            return doExec(`${apiPrefix}out`, opts);
        }
    },
    // 安全管理
    safe: {
        //检查项目
        items(opts) {
            return doExec(`${apiPrefix}api/safe/items`, opts, null, 'get');
        },
        //选择片区
        selArea(opts) {
            return doExec(`${apiPrefix}api/safe/selArea`, opts, null, 'get');
        },
        //选择点位
        selSite(opts) {
            return doExec(`${apiPrefix}api/safe/selSite`, opts, null, 'get');
        },
        //处理时限
        limites(opts) {
            return doExec(`${apiPrefix}api/safe/limites`, opts, null, 'get');
        },
        //发现隐患
        // addSafe(opts) {
        //     return doExec(`${apiPrefix}api/safe/addSafe`, opts);
        // },
        addSafeList(opts) {
            return doExec(`${apiPrefix}api/safe/addSafeList`, opts, 'JSON');
        },
        //选择部门
        selDept(opts) {
            return doExec(`${apiPrefix}api/safe/selDept`, opts, null, 'get');
        },
        //选择责任人
        selPerson(opts) {
            return doExec(`${apiPrefix}api/safe/selPerson`, opts, null, 'get');
        },
        //图片上传
        uploadFile(opts) {
            return doExec(`${apiPrefix}api/safe/uploadFile`, opts);
        },


        //系统列表
        sys(opts) {
            return doExec(`${apiPrefix}api/safe/sys`, opts, null, 'get');
        },
        //排水点位
        sitePs(opts) {
            return doExec(`${apiPrefix}api/safe/sitePs`, opts, null, 'get');
        },
        //污水点位
        siteWs(opts) {
            return doExec(`${apiPrefix}api/safe/siteWs`, opts, null, 'get');
        },
        //部门负责人
        deptpeople(opts) {
            return doExec(`${apiPrefix}api/safe/deptpeople`, opts, null, 'get');
        },
        //安全员
        safepeople(opts) {
            return doExec(`${apiPrefix}api/safe/safepeople`, opts, null, 'get');
        },




        //导航栏列表对应数量
        num(opts) {
            return doExec(`${apiPrefix}api/safe/num`, opts, null, 'get');
        },
        //未处理隐患列表
        undeallist(opts) {
            return doExec(`${apiPrefix}api/safe/undeallist`, opts, null, 'get');
        },
        //审核中隐患列表
        uncheklist(opts) {
            return doExec(`${apiPrefix}api/safe/uncheklist`, opts, null, 'get');
        },
        //已完成隐患列表
        donelist(opts) {
            return doExec(`${apiPrefix}api/safe/donelist`, opts, null, 'get');
        },
        //查看隐患详情
        selSafeId(opts) {
            return doExec(`${apiPrefix}api/safe/selSafeId`, opts, null, 'get');
        },
        //整改隐患
        addChange(opts) {
            return doExec(`${apiPrefix}api/safe/addChange`, opts, 'JSON');
        },
        //审核隐患
        addAuding(opts) {
            return doExec(`${apiPrefix}api/safe/addAuding`, opts, 'JSON');
        },
        //上传图片
        uploadUrl(opts) {
            return doExec(`${apiPrefix}api/safe/uploadFile`, opts, 'formdata');
        },
        //处理
        safeOfficerList(opts) {
            return doExec(`${apiPrefix}api/safe/safeOfficerList`, opts);
        },
        //安全员管理员
        safeAdminList(opts) {
            return doExec(`${apiPrefix}api/safe/safeAdminList`, opts);
        },
        //处理
        secondSafeOfficerList(opts) {
            return doExec(`${apiPrefix}api/safe/secondSafeOfficerList`, opts);
        },
        //处理导航栏数量
        safeOfficerNavigation(opts) {
            return doExec(`${apiPrefix}api/safe/safeOfficerNavigation`, opts);
        },
        //安全管理员导航栏数量
        safeAdminNavigation(opts) {
            return doExec(`${apiPrefix}api/safe/safeAdminNavigation`, opts);
        },
    }
};